#!/bin/bash
echo -n "Configuring XRDP ... "
grep -i "^address=127\.0\.0\.1$" /etc/xrdp/xrdp.ini > /dev/null
result=$?
if [ $result -eq 1 ]; then
	value=$(</etc/xrdp/xrdp.ini)
	value=${value/\[globals\]/\[globals\]$'\n'address=127.0.0.1}
	echo "$value" > /etc/xrdp/xrdp.ini
	echo "done."
else
	echo "skipped."
fi;
